//
//  ViewController.m
//  bookView
//
//  Created by mac on 15-12-4.
//  Copyright (c) 2015年 yb. All rights reserved.
//

#import "ViewController.h"
#import "bookViewController.h"
@interface ViewController ()
{
    NSMutableArray *bookList;
}
@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    self.title = @"小说列表";
    bookList = @[
                 @"神雕侠侣",
                 @"天龙八部",
                 @"武林外传"
                 ].mutableCopy;
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return bookList.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *booklistfier = @"booklistfier";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:booklistfier];
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:booklistfier];
    }
    cell.textLabel.text = bookList[indexPath.row];
    [self.tableView addSubview:cell];
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    bookViewController *con = [[bookViewController alloc] initWithStyle:UITableViewStyleGrouped];
    con.text =@"我是一只小小小小小小小小鸟，🐦，怎么飞也飞不高，我寻寻觅觅、寻寻觅觅一个温暖的怀抱，这样大要求算不算太高，这样的要求算不算太高。hefukshfjkdsbnckhfuhejfbdsjkfnkjdsfnkjsehfenfljsnfkehfnfjksbgjdsbgjkfsnmd,sngjdsbgjdsfnjnndsbfjdsbfjdsbjgb";
    [self.navigationController pushViewController:con animated:YES];
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
